﻿@inject IPageHeadBuilder pagebuilder
@model PasswordRecoveryConfirmModel
@{
    Layout = "_ColumnsOne";

    //title
    pagebuilder.AddTitleParts(T("PageTitle.PasswordRecovery").Text);
}
@using Grand.Web.Models.Customer;
<div class="page password-recovery-page">
    <h1 class="generalTitle h2">@T("Account.PasswordRecovery")</h1>
    @if (!String.IsNullOrEmpty(Model.Result))
    {
        <div class="alert alert-info mt-3">@Model.Result</div>
    }
    @if (!Model.DisablePasswordChanging)
    {
        <form asp-route="PasswordRecoveryConfirm" asp-route-token="@Context.Request.Query["token"]" asp-route-email="@Context.Request.Query["email"]" method="post" autocomplete="off">
            <div asp-validation-summary="ModelOnly" class="message-error"></div>
            <div class="form-fields">
                <div class="inputs">
                    <label asp-for="NewPassword" class="col-form-label">@T("Account.PasswordRecovery.NewPassword"):</label>
                    <input asp-for="NewPassword" class="form-control" />
                    <span asp-validation-for="NewPassword"></span>
                </div>
                <div class="inputs">
                    <label asp-for="ConfirmNewPassword" class="col-form-label">@T("Account.PasswordRecovery.ConfirmNewPassword"):</label>
                    <input asp-for="ConfirmNewPassword" class="form-control" />
                    <span asp-validation-for="ConfirmNewPassword"></span>
                </div>
            </div>
            <b-row class="row">
                <b-col cols="12" class="text-xs-center my-3">
                    <input type="submit" name="set-password" class="btn btn-secondary new-password-button" value="@T("Account.PasswordRecovery.ChangePasswordButton")" />
                </b-col>
            </b-row>
        </form>
    }
</div>
